package user;

import book.BookList;
import operation.Operation;

public abstract class User {
    public String name;
    protected Operation[] operations;

    User(String name) {
        this.name = name;
    }

    public abstract int menu();

    public abstract void operation(int pos, BookList bookList);

    public Operation getOperation(int pos) {
        if (pos < 0 || pos > operations.length) {
            return null;
        } else {
            return this.operations[pos];
        }

    }
}
